package juc.deadlock;

import juc.Sleeper;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;


public class Philosopher02 {
    public static void main(String[] args) {
        Chopstick c1 = new Chopstick("1");
        Chopstick c2 = new Chopstick("2");
        Chopstick c3 = new Chopstick("3");
        Chopstick c4 = new Chopstick("4");
        Chopstick c5 = new Chopstick("5");
        new Philosopher("t1", c1, c2).start();
        new Philosopher("t2", c2, c3).start();
        new Philosopher("t3", c3, c4).start();
        new Philosopher("t4", c4, c5).start();
        new Philosopher("t5", c1, c5).start();
    }
}
